<?php
require_once dirname(__FILE__).'/simple_html_dom.php';
header('Content-Type: text/html; charset=UTF-8');
$html = new simple_html_dom();

$html->load_file('http://localhost/ChinaWeather/c.html');
//$todayWeather001 = $html->find(".TodayWeather001s");
//$fivedays = $html->find(".qiriWeather.clear");

$fivedays = $html->find("[class*='qiriWeather']");

print_r($fivedays[0]->plaintext);
$order = array("\r\n", "\n", "\r");
$replace = '';
$text=str_replace($order, $replace, $html->plaintext);

//print_r($text);
$str = explode("/[\s]+/", $text);
//$arr = explode(" ", $str[0]);
//print_r($str);

$parsed = preg_split('/ +/', $text); // one or more spaces
//print_r($parsed);
$days= array();
foreach ($parsed as $temp){
	//echo $temp;
	if(!empty($temp)&&strlen(trim($temp))>0){
		//echo $temp.'='.strlen(trim($temp));
		$days[]=trim($temp);
	}
}

print_r($days);
?>